﻿using System.Windows.Forms;
using Core.Presenters;
using Core.Reports;
using Core.Views;

namespace MainUI
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
            this.IsMdiContainer = true;
        }

   

        private void BuildingsButton_Click(object sender, System.EventArgs e)
        {
            var view = new DataView();
            view.MdiParent = this;
            var presenter = new BuildingsPresenter(view);
        }

        private void ActionsButton_Click(object sender, System.EventArgs e)
        {
            var view = new DataView();
            view.MdiParent = this;
            var presenter = new ActionsPresenter(view);
        }

        private void DisrictsButton_Click(object sender, System.EventArgs e)
        {
            var view = new DataView();
            view.MdiParent = this;
            var districts = new DistrictsPresenter(view);
        }

        private void выходToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            this.Close();
        }

        private void покупателиToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var view = new DataView();
            view.MdiParent = this;
            var customers = new CustomersPresenter(view);
        }

        private void преватезированыеЗданияToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var view = new DataView();
            view.MdiParent = this;
            var customers = new OwnedBuildingsPresenter(view);
        }

        private void налогиToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var rv = new SecondReport();
            rv.ShowDialog();
        }

        private void сведенияОПокупателяхToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var rv = new ThirdReportViewer();
            rv.ShowDialog();
        }

        private void категорииСтоимостиToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var rv = new ForthReport();
            rv.ShowDialog();
        }

        private void информацияОНалогахToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var rv = new FirstReport();
            rv.ShowDialog();
        }
    }
}
